package com.gqr.threadpool;

/**
 * Copyright (C), 2020-2024,gqr
 * FileName:EveryTaskOneThread
 * author:guqingrong
 * Date:2024-05-05 21:51
 * Description:for内循环创建线程
 * History:
 * <author>    <time>    <version>    <desc>
 * 作者姓名     修改时间     版本号        描述
 */
public class ForLoop {
    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            Thread thread = new Thread(new Task());
            thread.start();
        }

    }

    static class Task implements Runnable{

        @Override
        public void run() {
            System.out.println("执行了任务");
        }
    }
}
